<!--********************* Part1:Jsp Head *********************-->

<%@ page contentType="text/html;charset=UTF-8"%>  
<%@ include file="/framework/head.jsp"%>


<!--********************* Part2:Java Code *********************-->
<%
	BbsSearchEvent event = (BbsSearchEvent)context.getSessionValue("BbsSearchEvent");
	ObjectList list = Bbs.fetch().search(con,event);
%>

<!--********************* Part3:JavaScript Code ***************-->
<!--start 客户端脚本区域-->
<script language=javascript>

var list_code = "listBbs";

function doSearch()
{
	SetValue("s_StartCreateTime", GetValue("i_StartCreateTime"));
	SetValue("s_EndCreateTime", GetValue("i_EndCreateTime"));
	SetValue("s_Subject", GetValue("i_Subject"));
	if(document.getElementById("i_HasReplies").checked) {
		SetValue("s_HasReplies", <%=ConstDefine.YES%>);
	} else {
		SetValue("s_HasReplies", <%=ConstDefine.NO%>);
	}
	if(document.getElementById("i_RelUserId").checked) {
		SetValue("s_RelUserId", <%=ConstDefine.STR_YES%>);
	} else {
		SetValue("s_RelUserId", <%=ConstDefine.STR_NO%>);
	}


	doCommonSearch();
}

function bizViewBbs(id)
{
	window.open("<%=Config.getSrv()%>?action_code=viewBbs&Id="+id, "_self");
}


function doToAdd()
{
	SetAction("toAddBbs");
	frm.submit();
}



key_InitDefault();
key_RegSubmitHandler(doSearch);
</script>

<%=uiBody%>>

<!--********************* Part4:Form  ***************-->
<form id=frm action="<%=Config.getSrv()%>" method="post">
<input type=hidden name="action_code" value="">
<input type=hidden name="Id" value="">
<input type=hidden name=sortOrder value="1">

<!--查询条件保留区域-->
<input type="hidden" name="s_StartCreateTime" value="<%=event.getStartCreateTime() %>">
<input type="hidden" name="s_EndCreateTime" value="<%=event.getEndCreateTime() %>">
<input type="hidden" name="s_HasReplies" value="<%=event.getHasReplies() %>">
<input type="hidden" name="s_RelUserId" value="<%=event.getRelUserId() %>">
<input type="hidden" name="s_Subject" value="<%=event.getSubject() %>">
<%@ include file="/framework/list_head.jsp"%>


<!--********************* Part5:Search Area ***************-->
<%=uiSearchStart%>>
<%
	int key_tab = 1 ;
%>
	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			主题：<input type="text" class="texts" name="i_Subject" size=80 value="<%=event.viewSubject() %>">
		</td>
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			发布时间：
			<%=framework.custom.UIManager.generateDateInput("i_StartCreateTime",event.getStartCreateTime())%>
			至
			<%=framework.custom.UIManager.generateDateInput("i_EndCreateTime",event.getEndCreateTime())%>
			
		</td>
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			<input type="checkbox" name="i_HasReplies" id="i_HasReplies" <%= event.getHasReplies() == ConstDefine.YES ? "checked" : "" %>>有回复的意见建议
			<input type="checkbox" name="i_RelUserId" id="i_RelUserId" <%= event.getRelUserId() != null && event.getRelUserId().length() > 0 ? "checked" : "" %>>我参与的
		</td>
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			<input type="button" value="查询" class="buttons" onclick="doSearch();return false;">&nbsp;<input type="button" value="清空" class="buttons" onclick="doClearEvent();return false;">
		</td>
	</tr>

<%=uiSearchEnd%>

<!--列表标题-->
<%=UIManager.addListHeadTitle("反馈建议列表")%>

<!--********************* Part6:List Area ***************-->

<%=uiListStart%>>

<%@ include file="/framework/list_foot.jsp"%>

<%
	int index = 1 ;
%>	
	<%=uiListHeadTR%>>
		<%=UIManager.addListHeadCheckBox() %>

		<%=UIManager.addListHead("序号",index++,"num")%>

		<%=UIManager.addListHead("主题",index++)%>

		<%=UIManager.addListHead("创建时间",index++)%>

		<%=UIManager.addListHead("创建人",index++)%>
		
		<%=UIManager.addListHead("回复次数",index++)%>
    
		<%=UIManager.addListHead("操作",-1)%>  
	<%=uiListHeadTREnd%>>
	
	<!--data-->
<%
	for(int i=0;i<list.size();i++)
	{
		Bbs obj = (Bbs)list.get(i);
%>
	<%=uiListDataTR[i%2]%> align=center>
    	<%=uiListDataTD%>>
    		<input type="checkbox" name="ids" value="<%=obj.getId()%>">
    	</td>
    	
    
    	<%=uiListDataTD%> width="10%"><%=obj.viewId(con)%></td>
    
    	<%=uiListDataTD%> width="40%"><%=obj.viewSubject(con)%></td>
    
    	<%=uiListDataTD%> width="15%"><%=obj.viewCreateTime(con)%></td>
    
    	<%=uiListDataTD%> width="15%"><%=obj.viewCreateUser(con)%></td>
     
    	 <%=uiListDataTD%> width="10%"><%=obj.viewReplyNum(con)%></td>

    	<%=uiListDataTD%>>
    		<a href="" onclick="bizViewBbs(<%=obj.getId()%>);return false;">浏览</a>
    	</td>
  	</tr>
<%	
	}
%>  

<%@ include file="/framework/list_foot2.jsp"%>

<%=uiListEnd%>


<!--********************* Part7:Action Area ***************-->
<%=uiCommandStart%>>
	<%=uiCommandTR%>>
		<%=uiCommandTD%>>
		<input type=button value="    发表新建议   " class="buttons" onclick="doToAdd();return false;">
		</td>
	</tr>	
<%=uiCommandEnd%>
</form>


<%@ include file="/framework/foot.jsp"%>

<!--
	Author    :wangp
	FileName  :/system/base//D:\\APEP3\\JavaSourceOutput\BbsList.jsp
-->
